// vite.config.js
import vue from '@vitejs/plugin-vue'
import viteCompression from 'vite-plugin-compression'
import path from 'path'

const resolve = (dir) => path.join(__dirname, dir)
/**
 * @type {import('vite').UserConfig}
 */
export default {
  resolve: {
    alias: {
      '@': resolve('src')
    }
  },

  // proxy: {
  //   '/api': {
  //     target: 'http://api-hmugo-web.itheima.net',
  //     changeOrigin: true,
  //   },
  // },
  
  plugins: [
    vue(),
    viteCompression({
      verbose: true,
      disable: false,
      threshold: 10240,
      algorithm: 'gzip',
      ext: '.gz'
    })
  ],
  
}
